<template>
  <div class="views-home">
    <div class="home-menu-box">
      <div class="menu-title">索引</div>
      <el-link
        v-for="(item, index) in menuData"
        :key="index"
        type="primary"
        @click="router.push(item.to)"
      >
        {{ item.text }}
      </el-link>
    </div>
  </div>
</template>

<script lang="ts">
export default defineComponent({ name: 'ViewsHome' })
</script>
<script setup lang="ts">
import { defineComponent } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

const menuData = [
  { text: '表单生成器', to: '/form-create' },
  // { text: 'form-create-designer', to: '/form-create/designer' },
  { text: '计算器', to: '/calculator' },
  { text: '人生日历', to: '/life-calendar' }
  // { text: '工艺百科', to: '/technology-wiki/home' }
]
</script>

<style lang="scss" scoped>
.views-home {
  padding: 20px;
  .home-menu-box {
    .menu-title {
      margin-bottom: 10px;
    }
    .el-link {
      margin-right: 10px;
    }
  }
}
</style>
